<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui" template="/template/template_dialog.xhtml">
	<ui:define name="head">
		<title>#{lang.BaoHuFengXianGuanLi}</title>
		<link rel="stylesheet"
			href="#{request.contextPath}/resources/plugins/datatables/dataTables.bootstrap.css" />
		<link href='/resources/bootstrap/css/bootstrap-datetimepicker.min.css' rel='stylesheet' />
	</ui:define>
	<ui:define name="content">
		<div class='container-fluid'>
			<div class="row" id="contentDiv">
				<div class='col-sm-12 col-md-12'>
					<nav class="navbar navbar-default">
						<form class="navbar-form navbar-left">
							<div class="btn btn-default">
								<i class="fa fa-calendar"></i>
							</div>
							<div class="form-group">
								<input type="text" class="form-control" id="startTime" /> <input type="text"
									class="form-control" id="endTime" />
							</div>
							<div class="btn btn-default" onclick="query()">#{lang.ChaXun}</div>
						</form>
					</nav>
					<div class="nav-tabs-custom">
						<ul id="selectUL" class="nav nav-tabs">
							<li class="active"><a href="#overUnchecked" data-toggle="tab">#{lang.ChaoQiWeiJian}</a></li>
							<li><a href="#actRisk" data-toggle="tab">#{lang.DianwangBaoHuFengXianYunXing}</a></li>
							<li><a href="#mainProtectQuit" data-toggle="tab">#{lang.ZhuBaoHuTuiChuQiangKuang}</a></li>
						</ul>
						<div class="tab-content no-padding">
							<div id="overUnchecked" class="chart tab-pane active">
								<table id="uncheckedTab" class="table table-gray"></table>
							</div>
							<div id="actRisk" class="chart tab-pane">
								<table id="dwProtection" class="table table-gray"></table>
							</div>
							<div id="mainProtectQuit" class="chart tab-pane">
								<table id="mainProtection" class="table table-gray"></table>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
		<h:inputHidden id="start" value="#{request.getParameter('startTime')}"></h:inputHidden>
		<h:inputHidden id="end" value="#{request.getParameter('endTime')}"></h:inputHidden>
	</ui:define>
	<ui:define name="contentend">
		<script src="/resources/js/tables/mytable.js"></script>
		<script src="/resources/plugins/datatables/jquery.dataTables.min.js"></script>
		<script src="/resources/plugins/datatables/dataTables.bootstrap.min.js"></script>
		<script src="/resources/plugins/echarts/echarts.min.js"></script>
		<script src="/resources/js/mycharts/timeline.js"></script>
		<script src="/resources/bootstrap/js/bootstrap-datetimepicker.min.js"></script>
		<script>
			localeTitle = {
				XuHao : '#{lang.XuHao}',
				ZhiDiaoXiTong : '#{lang.ZhiDiaoXiTong}',
				GuangDongShengWang : '#{lang.GuangDongShengWang}',
				GuangXiShengWang : '#{lang.GuangXiShengWang}',
				YunNanShengWang : '#{lang.YunNanShengWang}',
				GuiZhouShengWang : '#{lang.GuiZhouShengWang}',
				HaiNanShengWang : '#{lang.HaiNanShengWang}',
				ZongJi : '#{lang.ZongJi}',
				GongZuoShiJian : '#{lang.GongZuoShiJian}',
				FengXianNeiRong : '#{lang.FengXianNeiRong}',
				FengXianDengJi : '#{lang.FengXianDengJi}',
				BaoHuTongDaoTuiChuQingKuang : '#{lang.BaoHuTongDaoTuiChuQingKuang}',
				ZhiXingShiJian : '#{lang.ZhiXingShiJian}',
				TongDaoZhongDuanShiJian : '#{lang.TongDaoZhongDuanShiJian}',
				DiaoGuanFanWei : '#{lang.DiaoGuanFanWei}',
				XiangGuanBaoHuCuoShi : '#{lang.XiangGuanBaoHuCuoShi}',
				ChangZhanMingCheng : '#{lang.ChangZhanMingCheng}',
				BeiZhu : '#{lang.BeiZhu}',
				ChaoQiWeiJian : '#{lang.ChaoQiWeiJian}',
				DianwangBaoHuFengXianYunXing : '#{lang.DianwangBaoHuFengXianYunXing}',
				ZhuBaoHuTuiChuQiangKuang : '#{lang.ZhuBaoHuTuiChuQiangKuang}'
			}
			var ulHeight = document.getElementById("selectUL").offsetHeight;
			var scrollYHeight = wrapperHeight - ulHeight - 170;
			$('#contentDiv').css('height', wrapperHeight);
		</script>
		<script src="dailyRiskDetail.js"></script>
		<script>
			$(function() {
				initTab();
			});
			$('a[data-toggle="tab"]').on('shown.bs.tab', function(e) {
				var title = $(e.target).html();
				if (title == localeTitle.ChaoQiWeiJian) {
					var t1 = window.setInterval(function() {
						if ($("#actRisk").width()) {
							mainProtectionTable.getTable().draw();
							window.clearInterval(t1);
						}
					}, 50);
				} else if (title == localeTitle.DianwangBaoHuFengXianYunXing) {
					var t2 = window.setInterval(function() {
						if ($("#mainProtectQuit").width()) {
							dwProtectionTable.getTable().draw();
							window.clearInterval(t2);
						}
					}, 50);
				} else if (title == localeTitle.ZhuBaoHuTuiChuQiangKuang) {
					var t3 = window.setInterval(function() {
						if ($("#uncheckedTab").width()) {
							uncheckedTab.getTable().draw();
							window.clearInterval(t3);
						}
					});
				}
			})
		</script>
		<style>
.input-group-btn {
position: absolute; width: 60px; height: 40px; left: 50%; top: 50%; margin-left: 150px;
margin-top: -16px
}

.input-group {
position: absolute; margin-top: 5px; margin-left: 20px
}

#endTime {
margin-left: 12px
}
</style>
	</ui:define>
</ui:composition>
